package com.nue.controller;

import com.nue.pojo.Register;
import com.nue.service.IDoctorService;
import com.nue.util.CommonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/doctor")
public class DoctorController {
    @Resource
    IDoctorService doctorService;


    @GetMapping("regist-list")
    CommonResult list(Integer type,HttpServletRequest request){
        String token=request.getHeader("token");
        return doctorService.list(type,token);
    }
    @PostMapping("regist-submit")
    CommonResult submit(Register register){
        return doctorService.submit(register);
    }

}
